package cn.wolfcode.car.business.service;

import cn.wolfcode.car.business.domain.BpmnInfo;
import cn.wolfcode.car.business.query.BpmnInfoQuery;
import cn.wolfcode.car.common.base.page.TablePage;
import cn.wolfcode.car.common.base.page.TablePageInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.FileNotFoundException;
import java.io.InputStream;
import java.text.ParseException;
import java.util.List;

/**
 * 流程定义部署接口
 */
public interface IBpmnInfoService extends IService<BpmnInfo> {

    /**
     * 分页
     * @param qo
     * @return
     */
    TablePage<BpmnInfo> query(BpmnInfoQuery qo);


    /**
     * 查单个
     * @param id
     * @return
     */
    BpmnInfo get(Long id);


    /**
     * 保存
     * @param bpmnInfo
     */
    void add(BpmnInfo bpmnInfo);


    /**
     * 更新
     * @param bpmnInfo
     */
    void update(BpmnInfo bpmnInfo);

    /**
     *  批量删除
     * @param id
     */
    void delete(Long id);

    void deploy(String path, String bpmnType, String info) throws FileNotFoundException;

    InputStream readResource(Long deploymentId, String type);

    BpmnInfo queryByType(String car_package);
}
